package com.mark.spring.annotation.life.cycle.predestroy;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Description: 歌手
 * @Author: Mark
 * @CreateDate: 2019/9/17 21:09
 * @Version: 3.00.001
 * @Copyright : 豆浆油条个人非正式工作室
 */
public class Singer {

    private String name;
    private String song;

    public Singer(){
        System.out.println("Singer constructor");
    }

    /**
     * 在容器销毁Bean之前调用
     */
    @PreDestroy
    public void destroy(){
        System.out.println("QQ音乐下架了"+name+"的"+song);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSong() {
        return song;
    }

    public void setSong(String song) {
        this.song = song;
    }
}
